<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
test(() => assert_selection(
  [
    '<div contenteditable>',
      'One',
      '<div>',
        '|Two<br>',
        '<div>Three<br></div>',
      '</div>',
      'Four',
    '</div>'
  ].join(''),
  'delete',
  [
    '<div contenteditable>',
      'One|Two',
      '<div>',
        '<div>Three<br></div>',
      '</div>',
      'Four',
    '</div>'
  ].join('')), 'First merge');

test(() => assert_selection(
  [
    '<div contenteditable>',
      'OneTwo',
      '<div>',
        '<div>|Three<br></div>',
      '</div>',
      'Four',
    '</div>'
  ].join(''),
  'delete',
  [
    '<div contenteditable>',
      'OneTwo|Three<br>',
      'Four',
    '</div>'
  ].join('')), 'Second merge');

test(() => assert_selection(
  [
    '<div contenteditable>',
      'OneTwoThree<br>',
      '|Four',
    '</div>'
  ].join(''),
  'delete',
  [
    '<div contenteditable>',
      'OneTwoThree|Four',
    '</div>'
  ].join('')), 'Third merge');
</script>
